<?php
namespace app\index\logic;
use app\common\model\Base;

class TixianList extends Base
{
    //查询提现记录
    public function getDrawList($user) {
        $tixianjlarray = array();
        $counttix = TixianList::name('tixian_list')->where('username',$user)->select()->toArray();
        $counts = 0;
        foreach($counttix as $tx) {
            $counts += 1;
            $tixianjlarray[$counts]['txje'] = $tx['txje'];
            $tixianjlarray[$counts]['id'] = $tx['id'];
            $tixianjlarray[$counts]['zt'] = $tx['zt'];
            $tixianjlarray[$counts]['txtime'] = $tx['txtime'];
            $tixianjlarray[$counts]['beizhu'] = $tx['zt'] == 0 ? '处理中' : '蚂蚁官网';
        }
         
        $counttix = TixianList::name('tixian_list_no')->where('username',$user)->select()->toArray();
        foreach($counttix as $tx) {
            $counts += 1;
            $tixianjlarray[$counts]['txje'] = $tx['txje'];
            $tixianjlarray[$counts]['id'] = $tx['id'];
            $tixianjlarray[$counts]['zt'] = '退回';
            $tixianjlarray[$counts]['txtime'] = $tx['txtime'];
            $tixianjlarray[$counts]['beizhu'] = $tx['beizhu'];
        }
        return $tixianjlarray;
    }
    
}